Recent advances in computer performance have enabled graphics systems to provide more realistic graphical images using personal computers, home video game computers, handheld devices, and the like. In such graphics systems, a number of procedures are executed to “render” or draw graphics primitives to the screen of the system. A “graphics primitive” is a basic component of a graphic, such as a point, line, polygon, or the like. Rendered images are formed with combinations of these graphics primitives. Many procedures may be utilized to perform three-dimensional (3-D) graphics rendering.
Specialized graphics processing units (GPUs) have been developed to increase the speed at which graphics rendering procedures are executed. The GPUs typically incorporate one or more rendering pipelines. Each pipeline includes a number of hardware-based functional units that are designed for high-speed execution of graphics instructions/data. Generally, the instructions/data are fed into the front end of a pipeline and the computed results emerge at the back end of a pipeline. The hardware-based functional units, cache memories, firmware, and the like, of the GPUs are designed to operate on the basic graphics primitives and produce real-time rendered 3-D images.
Graphics primitives such as polygons are generally broken down into triangles for rendering. To render a 3-D object on a two-dimensional (2-D) display device, various attribute values (e.g., red, green and blue color values) are specified at each vertex of a given triangle, and the attribute values are interpolated across the triangle. To achieve the correct visual effect, it is necessary to account for the positions of the vertices in 3-D screen space, referred to as perspective correction. Generally speaking, attribute values at the vertex closest to the viewer may need to be weighted more than values at the other vertices. Also, the weight given to values at more distant vertices can depend on how far the viewer is from those vertices (here, distance refers to the distance in screen space). Consequently, perspective correction can be computationally expensive and slow because the interpolation of attribute values across the triangle is typically not linear.
There is increasing interest in rendering 3-D graphical images in handheld devices such as cell phones, personal digital assistants (PDAs), and other devices where cost and power consumption are important design considerations. A method or system for perspective correction that can be efficiently implemented in such devices would therefore be valuable.